import axios from '@/axios';

export default {
  queryDeviceStatus (deviceId) {
    return axios.get('/api/queryDeviceStatus?deviceId=' + deviceId);
  },
  queryDeviceStatusHistory (deviceId) {
    return axios.get('/api/queryDeviceStatusHistory?deviceId=' + deviceId);
  },
  queryDeviceLoginErrorHistory (deviceId) {
    return axios.get('/api/queryDeviceLoginErrorHistory?deviceId=' + deviceId);
  },
  deltWithLoginErr (deviceId) {
    return axios.post('/api/deltWithLoginErr?deviceId=' + deviceId);
  },
  queryDeviceDeepHistory (deviceId, startTime, endTime) {
    return axios.get('/api/deepAnalysis?deviceId=' + deviceId + "&start_time=" + startTime + "&end_time=" + endTime);
  },
  modifyHeartTime (deviceId, min) {
    var params = {'deviceId': deviceId, 'min': min};
    return axios.post('/api/modifyHeartTime', params);
  },
  queryHeartDetail (deviceId) {
    return axios.get('/api/heartAnalysis?deviceId=' + deviceId);
  }
}
